package org.jeecg.modules.incomingRecord.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.jeecg.modules.incomingRecord.entity.IncomingRecord;
import org.jeecg.modules.incomingRecord.mapper.IncomingRecordMapper;
import org.jeecg.modules.incomingRecord.service.IIncomingRecordService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.Collections;
import java.util.List;

/**
 * @Description: 入库信息表
 * @Author: jeecg-boot
 * @Date:   2025-04-15
 * @Version: V1.0
 */
@Service
public class IncomingRecordServiceImpl extends ServiceImpl<IncomingRecordMapper, IncomingRecord> implements IIncomingRecordService {

    @Override
    public List<IncomingRecord> getByBatchIdAndMaterialType(String batchId, Integer materialType) {
        LambdaQueryWrapper<IncomingRecord> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(IncomingRecord::getBatchId,batchId);
        wrapper.eq(IncomingRecord::getMaterialType,materialType);
        return list(wrapper);
    }

}
